import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/ManageClassCoursePlan/GetClassCoursePlanPage',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

// 获取教师课表
export const getKebiao = (params) => {
  return request({
    url: '/api/ManageClassCoursePlan/GetTeacherCoursePlan',
    method: 'get',
    params: {
      ...params,
    }
  })
}

export const getDetail = (params) => {
  return request({
    url: '/api/ManageClassCoursePlan/GetClassCoursePlanInfo',
    method: 'get',
    params: params
  })
}

export const remove = (params) => {
  return request({
    url: '/api/ManageClassCoursePlan/DelClassCoursePlan',
    method: 'post',
    data: params
  })
}

export const add = (row) => {
  return request({
    url: '/api/ManageClassCoursePlan/AddOrEditClassCoursePlan',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/ManageClassCoursePlan/AddOrEditClassCoursePlan',
    method: 'post',
    data: row
  })
}

// 左侧树
export const getBjTree = (params) => {
  return request({
    url: '/api/ManageClassCourse/GetLeftHandTree',
    method: 'get',
    params: {
      ...params,
    }
  })
}

// 年级下拉
export const grade = (params) => {
  return request({
    url: '/api/ManageClassCoursePlan/GetGradeSelect',
    method: 'get',
    params: {
      ...params,
    }
  })
}

// 根据年级id获取年级设置（字典）
export const gradeDic = (params) => {
  return request({
    url: '/api/ManageClassCoursePlan/GetGradeSetSelect',
    method: 'get',
    params: {
      ...params,
    }
  })
}

// 根据年级id获取班级下拉
export const schoolClass = (params) => {
  return request({
    url: '/api/ManageClassCoursePlan/GetClassSelect',
    method: 'get',
    params: {
      ...params,
    }
  })
}

// 根据班级课程id获取课程信息
export const getCourseSelect = (params) => {
  return request({
    url: '/api/ManageClassCoursePlan/GetCourseSelect',
    method: 'get',
    params: {
      ...params,
    }
  })
}


